<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Change Password </title>
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
<script language="JavaScript" src="gen_validatorv4.js" type="text/javascript"></script>
</head>
<%
	
	String userName=(String)session.getAttribute("userName");			
	if(userName == null)
	{
		response.sendRedirect("index.jsp");
		return;
	}
 %>
<body>

<jsp:include page="/header.jsp" />

<div id="wrapper">
	<!-- start page -->
	<div id="page">
		<jsp:include page="/sideMenuLeft.jsp" />
		<!-- start content -->
		<div id="content">			
			<div class="post">
				<h1 class="title"><a href="#">Change Password</a></h1>
				<p class="byline"><br ></p>
				<div class="entry">
					<form id="form1" name="form1" method="post"
						action="changePasswordServlet">
						<table border="0" align="center" >
							<tr>
								<td>
									<div align="left">
										Enter Current Password
									</div>
								</td>
								<td>
									:
									<input name="txtcurrentpwd" type="password" id="txtcurrentpwd" />
								</td>
							</tr>
							<tr>
								<td>
									<div align="left">
										Enter New Password
									</div>
								</td>
								<td>
									:
									<input name="txtnewpwd" type="password" id="txtnewpwd" />
								</td>
							</tr>
							<tr>
								<td>
									<div align="left">
										Confirm New Password
									</div>
								</td>
								<td>
									:
									<input name="txtnewpwd1" type="password" id="txtnewpwd1" />
								</td>
							</tr>
							<tr>
								<td>
									<div align="right">
										<input type="submit" name="Submit" value="Submit" />
									</div>
								</td>
								<td>									
								</td>
							</tr>
						</table>
			</form>
			
			<script language="JavaScript" type="text/javascript">//<![CDATA[
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
   
  
  frmvalidator.addValidation("txtcurrentpwd","req","Please enter your Password");
  frmvalidator.addValidation("txtcurrentpwd","minlen=4","Min length for Password is 4");
  frmvalidator.addValidation("txtcurrentpwd","maxlen=20","Max length for Password is 20"); 
  
  frmvalidator.addValidation("txtnewpwd","req","Please Re-type your Password");
  frmvalidator.addValidation("txtnewpwd","minlen=4","Min length for Password is 4");
  frmvalidator.addValidation("txtnewpwd","maxlen=20","Max length for Password is 20");  
    
  frmvalidator.addValidation("txtnewpwd1","eqelmnt=txtnewpwd","The confirmed password is not same as password");
  
  
//]]></script>
   
				</div>
			</div>
			
		</div>
		<!-- end content -->
		<!-- start sidebars -->
		<jsp:include page="/sideMenuRight.jsp" />
		<!-- end sidebars -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end page -->
</div>
<jsp:include page="/footer.jsp" />
</body>
</html>



